package utils;

/**
 * Created by Administrator on 2016/7/27.
 */
public class MyUrl {
    public static final String Font_Url = "http://123.57.219.102:8080/";
    //public static final String Font_Url= "http://172.16.14.100:8080/";

    public static final String Image = "CarMarket/upload/";
    public static final String CarImage = "CarMarket/car/";
    public static final String ImageMain = "CarMarket/package/";

    /**
     * 注册用户
     *  参数：phone：电话，password：密码
     * 成功返回值：{"code":0,"errorMessage":"","data":{"id":21,"userName":"13513760934","password":"123456","trueName":"","headPic":"default.jpg","sex":"","phone":"13513760934","openPhone":0,"email":"","openEmail":0,"qq":"","openQQ":0,"weichart":"","openWeichart":0,"remark":"","type":0}}
     *失败返回值：{"code":-1,"errorMessage":"\u7535\u8BDD\u5DF2\u5B58\u5728\uFF01","data":""}
     */
    public  static final String register = "CarMarket/userAction_addUser.action?";
    /**
     * 2、修改密码
     地址：http://localhost:8080/CarMarket/userAction_changePwd.action
     参数：id：用户id，oldPwd：原始密码，newPwd新密码
     成功返回值：无返回值
     {"code":-1,"errorMessage":"\u7535\u8BDD\u5DF2\u5B58\u5728\uFF01","data":""}

     */
    public  static final String changePwd = "CarMarket/userAction_changePwd.action";
    /**
     * 3、登录
     地址：http://localhost:8080/CarMarket/userAction_loginUser.action
     参数：phone：电话，password：密码
     成功返回值：{"code":0,"errorMessage":"","data":{"id":2,"userName":"3","password":"3","trueName":"3","sex":"on","phone":"13","openPhone":0,"openEmail":0,"openQQ":0,"openWeichart":0,"remark":"3","type":0}}
     {"code":-1,"errorMessage":"\u7528\u6237\u540D\u5BC6\u7801\u9519\u8BEF\uFF01","data":""}
     */
    public  static final String login = "CarMarket/userAction_loginUser.action?";
    /**
     *4、上传头像
     地址：http://:8080/CarMarket/userAction_upLoadPhoto.action
     参数：id：用户id,headPhoto：头像文件
     成功返回值：{"code":0,"errorMessage":"","data":"1467167750331.txt"}
     */
   public static final String post_icon = "CarMarket/userAction_upLoadPhoto.action";
    /**
     * 5、找回密码
     地址：http://localhost:8080/CarMarket/userAction_getPassword.action
     参数：phone：电话，password：新密码
     成功返回值：{"id":2,"password":"4","phone":"13","openPhone":0,"openEmail":0,"qq":"876","openQQ":0,"openWeichart":0,"type":0}
     */
   public static final String findPwd = "CarMarket/userAction_getPassword.action";
    /**
     * 6，获取用户信息
     * 地址：http://localhost:8080/CarMarket/userAction_getDetail.action
     参数：id：用户id
     成功返回值：{"id":2,"password":"3","phone":"13","openPhone":0,"openEmail":0,"qq":"876","openQQ":0,"openWeichart":0,"type":0}
     */
    /*
    * */
   public static final String getData = "CarMarket/userAction_getDetail.action?";
    /**
     * 7、修改用户资料
     地址：http://localhost:8080/CarMarket/userAction_updateDetail.action
     参数：id：用户id，phone:电话，openPhone：是否公开电话（0，1）
     email:邮箱，openEmail：是否公开邮箱，qq：QQ，openQQ:是否公开qq，
     weichart:微信，openWeichart：是否公开微信
     成功返回值：{"id":2,"password":"3","phone":"13","openPhone":0,"openEmail":0,"qq":"876","openQQ":0,"openWeichart":0,"type":0}
     */
    public static final String updateDetail = "CarMarket/userAction_updateDetail.action?";
    /**
     * 8、验证电话
     地址：http://localhost:8080/CarMarket/userAction_checkPhone.action
     参数：phone：电话号码
     成功返回值：{"code":0,"errorMessage":"","data":"电话已存在！"}
     */
   public static final String checkPhone = "CarMarket/userAction_checkPhone.action";
    /**
     *

     9、发布帖子
     地址：http://localhost:8080/CarMarket/notes/notesAction_addNote.action
     参数：userId：用户id, img:图片，content:内容
     成功返回值：{"id":1,"userId":0,"createTime":"2016-07-05","content":"44","imgs":"1467710257375.png,1467710257375.png","likeCount":0,"showCount":0}
     */
    public static final String addNote = "CarMarket/notes/notesAction_addNote.action";
    /**
     *
     10、点赞
     地址：http://localhost:8080/CarMarket/notes/notesAction_addLike.action
     参数：id：帖子id
     成功返回值：{"id":1,"userId":0,"createTime":"2016-07-05","content":"44","imgs":"1467710257375.png,1467710257375.png","likeCount":2,"showCount":0}
     */
   public static final String addLike = "CarMarket/notes/notesAction_addLike.action";
    /**
     *
     11、查询帖子
     地址：http://localhost:8080/CarMarket/notes/notesAction_queryByUser.action
     参数：id：用户id（可选），page：页码，默认1，rows：每页显示数目，默认10
     成功返回值：[{"content":"44","id":1,"imgs":"1467710257375.png,1467710257375.png","username":"","likeCount":2,"createDate":"2016-07-05 17:17:37"}]
     */
   public static final String queryByUser = "CarMarket/notes/notesAction_queryByUser.action";
    /**
     *

     12、查询车辆信息(使用StringRequest的post方式请求（因为参数中有中文）)

     地址：http://localhost:8080/CarMarket/carAction_queryPage.action

     参数：type：车辆类别，km：公里数，s_price：价格范围（0-3），s_date：时间范围（1-2），page：页码，默认1，order：排序(1：按价格升序，2:按价格，3:按上牌日期升序，4:按上牌日期降序)

     成功返回值：[{"imags":"1.png,2.png","tab":"",id":1,"title":"","price":0.0,"buyDate":"","km":0.0}]

     车辆图片信息：http://172.16.8.100:8080/CarMarket/car/文件名
     */
    public static final String queryPagedata = "CarMarket/carAction_queryPage.action";
    /**
     * 13、查询车辆详情
     地址：http://localhost:8080/CarMarket/carAction_queryById.action
     参数：id：车辆id
     成功返回值：{"id":1,"type":"","title":"","price":0.0,"km":0.0,"company":"","place":"","detail":"","auto":0,"outputValue":0.0,"color":"","transferTime":0,"district":"","film":"","level":"","engine":"","gearbox":"","structre":"","volume":"","wheelbase":0.0,"trunksize":0.0,"quality":0.0}
     */
    public static final String queryById = "CarMarket/carAction_queryById.action?id=";
    /**
     *
     14、查询车辆类别
     地址：http://localhost:8080/CarMarket/carAction_queryTypes.action
     参数：无
     成功返回值：["别克","大众"]

     使用工具类FirstLetterUtil.getFirstLetter("");方法获取汉字的首字母
     */
   public static final String queryTypes = "CarMarket/carAction_queryTypes.action";
    /**
     * 16、查询套餐详情
     地址：http://localhost:8080/CarMarket/packageAction_queryPage.action?order=1

     参数：order：1:按价格升序，2:按价格降序，3:按预约人数升序，4:按预约人数降序，page：页码， 默认1，rows：每页显示数目，默认10

     成功返回值：{"code":0,"errorMessage":"","data":[{"image":"2_2.png,2_1.png","com_location":"","price":180.0,"name":"","count":10,"id":5,"originaPrice":190.0}]}
     */
   public static final String queryPage = "CarMarket/packageAction_queryPage.action?order=";
    /**
     * 17、查询套餐详情
     地址：http://localhost:8080/CarMarket/packageAction_queryDetail.action
     参数：id:套餐id
     成功返回值：{"code":0,"errorMessage":"","data":{"id":3,"name":" ","content":"服务包含项目：轮毂修复,服务时长:2个小时，咕咕咕","originaPrice":260.0,"price":219.0,"pcount":6,"company":"","com_location":"","com_detail":"","image":"","phone":""}}
     */
   public static final String queryDetail = "CarMarket/packageAction_queryDetail.action";
    /**
     * 查询新闻
     */
   public static final String get_news = "http://api.dagoogle.cn/news/get-news?tableNum=4";
}
